﻿using mozhi.smarterp.Finance.Enums;
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Application.Dtos;

namespace mozhi.smarterp.Finance.Accounts
{
    public class AccountDto : EntityDto<Guid>
    {
        public Guid? ParentId { set; get; }

        public string ParentCode {  set; get; }

        public string ParentName { set; get; }

        /// <summary>
        /// 科目代码
        /// </summary>
        public string Code { set; get; }

        /// <summary>
        /// 科目名称
        /// </summary>
        public string Name { set; get; }

        /// <summary>
        /// 科目类型
        /// </summary>
        public AccountType AccountType { set; get; }

        /// <summary>
        ///状态
        /// </summary>
        public bool Activated { set; get; }

        /// <summary>
        /// 科目方向
        /// </summary>
        public AccountDirectionType Direction { set; get; }


        /// <summary>
        /// 是否外币核算
        /// </summary>
        public bool IsForeignCurrency { set; get; }

        /// <summary>
        /// 是否叶子结点
        /// </summary>
        public bool IsLeaf { set; get; }


        public bool IsFundAccount { set; get; }


        public Guid? BankAccountId { set; get; }


        /// <summary>
        /// 核算维度
        /// </summary>
        public List<AccountDimensionItemDto> DimensionItems { set; get; }
    }

    public class AccountDimensionItemDto : EntityDto<Guid> 
    {
        public Guid AccountId { set; get; }

        public Guid DimensionId { set; get; }

        public DataSourceType DataSourceType { set; get; }

        public Guid? TagId { set; get; }

        public string DimensionName { set; get; }

        public bool IsRequire { set; get; }

        public bool Activated { set; get; }
    }

}
